#ifndef IMAGEWIDGET_H
#define IMAGEWIDGET_H

#include <QLabel>
#include <QString>
#include <QImage>

class ImageWidget : public QLabel
{
    Q_OBJECT
    Q_PROPERTY(QImage image READ image WRITE setImage)

public:
    ImageWidget(QWidget *parent = 0);
    ImageWidget(const QString &fileName, QWidget *parent = 0);
    ImageWidget(const QImage &image, QWidget *parent = 0);

    bool open(const QString &fileName = QString());
    bool save(const QString &fileName);
    void setImage(const QImage &image);
    QImage image() const;
};

#endif
